﻿namespace ZR.Model.Souvenir
{
    [SugarTable("souvenir_order")]
    public class Order
    {
        [SugarColumn(IsPrimaryKey = true, IsIdentity = true)]
        public int Id { get; set; }
        
        [JsonConverter(typeof(ValueToStringConverter))]
        public long UserId { get; set; }
        
        /// <summary>
        /// 实际付款金额(单位是元,保留两位小数)
        /// </summary>
        public decimal Payment { get; set; }
        
        /// <summary>
        /// 支付时间
        /// </summary>
        public DateTime PaymentTime { get; set; }
        
        [Navigate(NavigateType.OneToMany, nameof(OrderItem.OrderId))]
        public List<OrderItem> OrderItems { get; set; }
    }
}